package com.cloud.hotline.api.mapper;

import java.util.List;

import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.SelectProvider;

import com.cloud.hotline.api.bean.HotlineCalculateBean;
import com.cloud.hotline.api.bean.HotlineCalculateForm;
import com.cloud.hotline.api.entity.ToHotlineRevisitRecord;
import com.cloud.hotline.api.provider.HotlineCalculateAllProvider;
import com.cloud.hotline.api.provider.HotlineCalculateAreaProvider;
import com.cloud.hotline.api.provider.HotlineCalculateCityProvider;
import com.cloud.hotline.common.utils.BaseMapperHelper;

public interface ToHotlineRevisitRecordMapper extends BaseMapperHelper<ToHotlineRevisitRecord> {

	@SelectProvider(type = HotlineCalculateCityProvider.class, method = "caculate")
	@Results({ @Result(property = "pm", column = "pm", javaType = String.class),
			@Result(property = "dw", column = "dw", javaType = String.class),
			@Result(property = "yxf", column = "yxf", javaType = String.class),
			@Result(property = "xyl", column = "xyl", javaType = String.class),
			@Result(property = "jjs", column = "jjs", javaType = String.class),
			@Result(property = "jjl", column = "jjl", javaType = String.class),
			@Result(property = "mys", column = "mys", javaType = String.class),
			@Result(property = "myl", column = "myl", javaType = String.class),
			@Result(property = "zhpf", column = "zhpf", javaType = String.class),
			@Result(property = "slhj", column = "slhj", javaType = String.class),
			@Result(property = "yjscz", column = "yjscz", javaType = String.class) })
	List<HotlineCalculateBean> calculateCity(HotlineCalculateForm form);

	@SelectProvider(type = HotlineCalculateAreaProvider.class, method = "caculate")
	@Results({ @Result(property = "pm", column = "pm", javaType = String.class),
		@Result(property = "dw", column = "dw", javaType = String.class),
		@Result(property = "yxf", column = "yxf", javaType = String.class),
		@Result(property = "xyl", column = "xyl", javaType = String.class),
		@Result(property = "jjs", column = "jjs", javaType = String.class),
		@Result(property = "jjl", column = "jjl", javaType = String.class),
		@Result(property = "mys", column = "mys", javaType = String.class),
		@Result(property = "myl", column = "myl", javaType = String.class),
		@Result(property = "zhpf", column = "zhpf", javaType = String.class),
		@Result(property = "slhj", column = "slhj", javaType = String.class),
		@Result(property = "yjscz", column = "yjscz", javaType = String.class) })
	List<HotlineCalculateBean> calculateArea(HotlineCalculateForm form);

	
	@SelectProvider(type = HotlineCalculateAllProvider.class, method = "caculate")
	@Results({ @Result(property = "pm", column = "pm", javaType = String.class),
		@Result(property = "dw", column = "dw", javaType = String.class),
		@Result(property = "yxf", column = "yxf", javaType = String.class),
		@Result(property = "xyl", column = "xyl", javaType = String.class),
		@Result(property = "jjs", column = "jjs", javaType = String.class),
		@Result(property = "jjl", column = "jjl", javaType = String.class),
		@Result(property = "mys", column = "mys", javaType = String.class),
		@Result(property = "myl", column = "myl", javaType = String.class),
		@Result(property = "zhpf", column = "zhpf", javaType = String.class),
		@Result(property = "slhj", column = "slhj", javaType = String.class),
		@Result(property = "yjscz", column = "yjscz", javaType = String.class) })
	List<HotlineCalculateBean> calculateAll(HotlineCalculateForm form);
}